import type { RouteRecordRaw } from 'vue-router'

const systemRouter: Array<RouteRecordRaw> = [
  {
    path: 'home',
    name: 'home',
    component: () => import('@/views/system/main/index.vue'),
    meta: {
      isPublic: true,
      ignoreAuth: true,
    },
  },
  {
    path: 'loading',
    name: 'loading',
    component: () => import('@/views/system/loading/index.vue'),
    meta: {
      isPublic: true,
      ignoreAuth: true,
    },
  },
  {
    path: 'error',
    component: () => import('@/views/system/error/err.vue'),
    redirect: '401',
    name: 'error',
    meta: {},
    children: [
      {
        path: '401',
        component: () => import('@/views/system/error/401.vue'),
        name: '401',
        meta: {},
      },
      {
        path: '404',
        component: () => import('@/views/system/error/404.vue'),
        name: '404',
        meta: {},
      },
    ],
  },
]

export { systemRouter }
